5af077cd441039d9b8125a9149f399b9bd8ee95c,src/org/exist/collections/Collection.java,Collection,validateXMLResourceInternal,#Txn#DBBroker#XmldbURI#CollectionConfiguration#ValidateBlock#,1172

Before Change


            } else {
                //This lock is released in storeXMLInternal()
                //TODO : check that we go until there to ensure the lock is released
                document.getUpdateLock().acquire(Lock.WRITE_LOCK);
                document.setDocId(broker.getNextResourceId(transaction, this));
                addDocument(transaction, broker, document);
            }

After Change


            } else {
                //This lock is released in storeXMLInternal()
                //TODO : check that we go until there to ensure the lock is released
            	if (transaction != null)
                	transaction.acquireLock(document.getUpdateLock(), Lock.WRITE_LOCK);
            	else
            		document.getUpdateLock().acquire(Lock.WRITE_LOCK);
            	
                document.setDocId(broker.getNextResourceId(transaction, this));
                addDocument(transaction, broker, document);